<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            margin: 0;
            padding: 0;
        }
        .countdown-container {
            text-align: center;
            margin-top: 20px;
        }
        .countdown {
            font-size: 36px;
            color: #007bff; 
            margin-bottom: 10px;
        }
        .countdown-text {
            font-size: 100px;
            color: #130101;
        }
    </style>
</head>
<body>
    <div class="countdown-container">
        <div class="countdown-text">距离双十一,还有</div>
        <div id="countdown"></div>
        
    </div>

    <script>
        function updateCountdown() {
            const now = new Date();
            const elevenEleven = new Date(now.getFullYear(), 10, 11); // 11月11日
            const difference = elevenEleven - now;

            if (difference <= 0) {
                document.getElementById('countdown').textContent = "双十一已经开始！";
            } else {
                const days = Math.floor(difference / (1000 * 60 * 60 * 24));
                const hours = Math.floor((difference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
                const minutes = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60));
                const seconds = Math.floor((difference % (1000 * 60)) / 1000);

                document.getElementById('countdown').textContent = `${days} 天 ${hours} 时 ${minutes} 分 ${seconds} 秒`;
            }
        }
        setInterval(updateCountdown, 1000);
        updateCountdown();
    </script>
</body>
</html>